﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="ListDanhMucControl.ascx.cs"
    Inherits="Hutech.CRM.Web.Controls.QuanLyDanhMucThongTin.ListDanhMucControl" %>
<%--<asp:UpdatePanel ID="UpdatePanelListDanhMuc" runat="server" UpdateMode="Conditional"
    ChildrenAsTriggers="false">
    <ContentTemplate>--%>
        <asp:HiddenField ID="HiddenFieldLoaiDanhMucName" runat="server" />
        <asp:HiddenField ID="HiddenFieldLoaiDanhMucGuid" runat="server" />
        <div class="block-small">
            <div class="bs-header">
                <div class="f-left search">
                    <div class="input-control text">
                        <asp:TextBox ID="txtsearch" runat="server" placeholder="Tìm kiếm nhanh"></asp:TextBox>
                        <%--<button class="btn-clear">
                        </button>--%>
                    </div>
                </div>
                <div class="f-right bt-addnew">
                    <asp:Button ID="ImageButtonThemMoi" runat="server" CssClass="default" Text="Thêm mới"
                        ToolTip="Thêm mới" />
                </div>
            </div>
            <div class="bs-content">
                <asp:DataList ID="DataListDanhMuc" DataKeyField="DanhMucGuid" runat="server">
                    <HeaderTemplate>
                        <table class="striped">
                            <thead>
                                <tr>
                                    <th class="stt">
                                        #
                                    </th>
                                    <th class="tengoi">
                                        Tên gọi
                                    </th>
                                    <th class="viettat">
                                        Viêt tắt
                                    </th>
                                    <th class="tacvu">
                                        Tác vụ
                                    </th>
                                </tr>
                            </thead>
                    </HeaderTemplate>
                    <ItemTemplate>
                        <%# Container.ItemIndex+1 %>
                        <td>
                            <asp:HiddenField ID="HiddenFieldIsActive" runat="server" Value='<%# DataBinder.Eval(Container.DataItem, "IsActive") %>' />
                            <%# DataBinder.Eval(Container.DataItem, "DanhMucName")%>
                        </td>
                        <td>
                            <%# DataBinder.Eval(Container.DataItem, "DanhMucID")%>
                        </td>
                        <td>
                            <asp:ImageButton ID="ImageButtonEdit" CssClass="ImageButtonEdit-16 ImageButton-16"
                                ImageUrl="~/Resources/img/none-16.png" runat="server" CommandName="EditCommand"
                                BorderStyle="NotSet" ToolTip="Chỉnh sửa" />
                            <asp:ImageButton ID="ImageButtonDelete" CssClass="ImageButtonDelete-16 ImageButton-16"
                                ImageUrl="~/Resources/img/none-16.png" runat="server" CommandName="DeleteCommand"
                                ToolTip="Xóa" OnClientClick="return confirm('Bạn đã chọn xoá dữ liệu...?');" />
                        </td>
                    </ItemTemplate>
                    <EditItemTemplate>
                        <%# Container.ItemIndex+1 %>
                        <td colspan="4">
                            <div class="editing-datalist">
                                <asp:HiddenField ID="HiddenFieldKeyKindGuid" runat="server" Value='<%# DataBinder.Eval(Container.DataItem, "LoaiDanhMucGuid") %>' />
                                Tên gọi
                                <br />
                                <asp:TextBox ID="TextBoxItemName" Text='<%# DataBinder.Eval(Container.DataItem, "DanhMucName") %>'
                                    runat="server" /><br />
                                Tên viết tắt<br />
                                <asp:TextBox ID="TextBoxItemID" Text='<%# DataBinder.Eval(Container.DataItem, "DanhMucID") %>'
                                    runat="server" /><br />
                                kích hoạt
                                <asp:CheckBox ID="CheckBoxIsActive" runat="server" Checked='<%# DataBinder.Eval(Container.DataItem, "IsActive") %>' />
                                <br />
                                <asp:ImageButton ID="ImageButtonSave" runat="server" Text="Save" ToolTip="Lưu" CommandName="ApplyCommand" />
                                <asp:ImageButton ID="ImageButtonExit" runat="server" Text="Exit" ToolTip="Hủy" CommandName="CancelCommand" />
                            </div>
                        </td>
                    </EditItemTemplate>
                </asp:DataList>
                </table> Số lượng danh mục&nbsp<asp:Label ID="lblLoaiDanhMucName" runat="server"
                    Text=""></asp:Label>:&nbsp
                <asp:Label ID="LblSoLuong" runat="server" Text="0" ForeColor="Red"></asp:Label>
                <asp:CheckBox ID="CheckBoxIsActive" runat="server" Text="&nbsp kích hoạt" AutoPostBack="true"
                    ToolTip="Hiển thị những Loại Chưa kích hoạt" />
            </div>
        </div>
<%--    </ContentTemplate>
    <Triggers>
        <asp:AsyncPostBackTrigger ControlID="DataListDanhMuc" EventName="ItemCommand" />
        <asp:AsyncPostBackTrigger ControlID="ImageButtonThemMoi" EventName="Click" />
        <asp:AsyncPostBackTrigger ControlID="CheckBoxIsActive" EventName="CheckedChanged" />
    </Triggers>
</asp:UpdatePanel>
--%>